package com.speech.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.speech.R;
import com.speech.net.result.Property_Result;
import com.speech.utils.PropertyAndUserInfoHolder;
import com.speech.utils.StringFomatUtil;
import com.speech.utils.TitleBuilder;

public class CoinDetailActivity extends BaseActivity {

    private TextView tv_coin_total;

    private TextView tv_lv1_receive;
    private TextView tv_lv2_receive;

    private TextView tv_reading_receive;
    private TextView tv_register_receive;
    private TextView tv_mission_noob_receive;
    private TextView tv_mission_super_receive;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_coin_detail);
        _initView();

        _initListViewData();

        tv_coin_total.setText(StringFomatUtil.formatDouble(PropertyAndUserInfoHolder.getPropertyObject().dTotalProperty));

        Property_Result property_result = PropertyAndUserInfoHolder.getPropertyObject();
        tv_reading_receive.setText(StringFomatUtil.formatDouble(property_result.dReadingProperty) + " SPK");

        tv_register_receive.setText( StringFomatUtil.formatDouble(property_result.dRegisterProperty) + " SPK");

        tv_mission_noob_receive.setText( StringFomatUtil.formatDouble(property_result.dMissionProperty) + " SPK");
        tv_mission_super_receive.setText( StringFomatUtil.formatDouble(property_result.dRewardProperty) + " SPK");


        tv_lv1_receive.setText(StringFomatUtil.formatDouble(property_result.dSpreadPropertyLv1)+" SPK");
        tv_lv2_receive.setText(StringFomatUtil.formatDouble(property_result.dSpreadPropertyLv2)+" SPK");

    }

    private void _initListViewData() {


    }

    private void _initView() {
        new TitleBuilder(this).setTitleText("资产明细");

        tv_coin_total = findViewById(R.id.tv_coinDetail_total);

        tv_lv1_receive = findViewById(R.id.tv_coinDetail_spread_lv1_receive);
        tv_lv2_receive = findViewById(R.id.tv_coinDetail_spread_lv2_receive);

        tv_reading_receive = findViewById(R.id.tv_coinDetail_reading_receive);
        tv_register_receive = findViewById(R.id.tv_coinDetail_register_receive);
        tv_mission_noob_receive = findViewById(R.id.tv_coinDetail_noob_receive);
        tv_mission_super_receive = findViewById(R.id.tv_coinDetail_super_receive);
    }
}
